package lesson5;

import java.util.HashMap;
import java.util.Map;

public class WrongInit {

    private Map<Integer, String> student ;

    public WrongInit(){
        new Thread(() ->{
            student = new HashMap<>();
            student.put(1, "王小美");
            student.put(2, "钱二宝");
            student.put(3, "周三");
            student.put(4, "赵四");
        }).start();
    }

    public static void main(String[] args) throws InterruptedException {
        WrongInit wrongInit = new WrongInit();
        Thread.sleep(100);
        System.out.println(wrongInit.student.get(1));
    }
}
